(1) Field of the Invention
The present invention relates to the field of computer controlled graphics display systems. More specifically the present invention relates to the field of performing real-time lighting utilizing three dimensional (3D) texture mapping to perform interactive graphics features.
(2) Prior Art
Computer controlled graphics systems are used for displaying graphics objects on a display screen. These graphics objects are composed of graphics primitive elements ("graphics primitives") that include points, lines, polygons, etc. Sequences of graphics primitives can be used to render a two dimensional (2D) image of a three dimensional (3D) object on a display screen. To create more realistic looking 3D graphics objects, texture mapping is used. Texture mapping refers to techniques for using 2D texture images for adding surface detail images to areas or surfaces of these 3D graphics objects. Along with 2D texture mapping, different lighting and shading techniques are also used to further refine the displayed images to create more realistic depiction of the graphics objects. Heretofore, texture mapping has only been used to perform lighting on graphics objects in a technique which has 2D texture mapping called bumpmapping.
Lighting and shading techniques that help create more realistic images are well known by those skilled in the art, and are discussed in a number of publications, such as Computer Graphics: Principles and Practice by James D. Foley et al., Addison-Wesley (1990). One well known prior art lighting technique is the use of a radiosity method to light and shade graphics objects. Radiosity is defined with relation to the rate of energy that leaves a surface. This rate of emitted surface energy is the sum total of all the energy reflected or emitted by the graphics surface. A radiosity method calculates the rate of emitted surface energy of all the graphics objects within a specific graphics scene. The information determined by the radiosity method is then used to provide the lighting values for the graphics objects within that scene. Generally, two steps are required to implement the radiosity values into the process of lighting graphics objects. The first step requires using a radiosity method to determine the light interaction between the graphics objects of a scene independent of the viewing angle of the scene. The second step renders the desired view of the scene and lights the graphics objects according to the radiosity values computed by complex functions during the radiosity method.
Light imaging using radiosity methods is one method to provide lighting values for graphics objects, but there are some disadvantages associated with these methods. One disadvantage associated with radiosity methods for lighting is that they are highly computation intensive requiring a computer system to spend substantial processing time determining the light interaction between graphics objects. The extended computer computation time is not a disadvantage if the predefined graphics scene displayed remains unchanged. However, if the scene requires real-time interaction with new objects moving into and out of a predefined viewing area, the increased processing time required of the radiosity methods for lighting is unworkable. Because of this extended computation time, two scenarios can exist if a new graphics object enters the viewable scene. The first scenario requires the recalculation of the radiosity values within the entire graphics scene. The second scenario requires maintaining the lighting values constant within the scene. Either scenario exhibits a substantial disadvantage to the graphics scene. For instance, choosing the first scenario results in a realistic scene, but producing the realistic scene requires extended computation time reducing real-time characteristics. The second scenario results in a scene that reacts in real-time, but the new object is unaffected by the established lighting values within the viewable scene resulting in the object appearing unrealistic. Therefore, it would be advantageous to provide a lighting technique that offers real-time lighting capability and that further exhibits real-time lighting of new graphics objects that enter a predefined graphics scene. The present invention provides these advantages.
Another prior art lighting technique is based on the normal vector of a polygon surface in combination with a vector representing the direction of the light. This "normal vector" technique requires computer computations to determine the light intensity at a polygon surface. Light imaging using the "normal vector" technique works for many applications, but there are some disadvantages associated with it. One disadvantage associated with the "normal vector" technique is that the graphics objects within a predefined scene do not cast shadows on other objects. By not casting shadows, the displayed graphics objects within the scene appear unrealistic. Therefore, it would be advantageous to provide a lighting technique that causes the graphics objects within a predefined scene to cast shadows. The present invention provides this advantage.
Another disadvantage associated with the "normal vector" technique is that it becomes computationally intensive during certain situations. These situations include the involvement of multiple light sources within a graphics scene or the act of turning on and off light sources within a scene. These situations result in computations that require a computer system to spend substantial processing time determining the light intensity of the object surfaces within a scene. The extended processing time causes some real-time applications using the "normal vector" technique to be unworkable especially when this technique is applied in real-time to new objects that enter the graphics scene. The disadvantages of the "normal vector" lighting technique hinder its effectiveness. Therefore, it would be advantageous to provide a lighting technique that reacts in real-time to the turning on and off of light sources within a graphics region and that provides lighting effects to the new objects that enter the graphics scene. The present invention provides these advantages.
The disadvantages of the prior art graphics lighting and shading techniques discussed above illustrate the need for a lighting technique that does not exhibit the above stated problems. The present invention provides such a system and method for providing lighting to graphics objects within a scene.